import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

// 导入路由
import Login from '@/views/login'
import Register from '@/views/register'
import Tpgjzc from '@/views/tpgjzc'
import Index from '@/views/index'
import News from '@/views/news'
import Personal from '@/views/personal'
import Application from '@/views/Application'
import rural from '@/views/rural'
import logintest from "@/views/logintest.vue";



const routes = [
    {
        path: '/',
        redirect: 'Index',
    },
    { path: '/index', component: Index ,title: '首页'},
    { path: '/login', component: Login ,title: '登录'},
    { path: '/logintest', component: logintest ,title: '登录测试'},
    { path: '/register', component: Register ,title: '注册'},
    { path: '/tpgjzc', component: Tpgjzc ,title: '脱贫攻坚政策'},
    { path: '/personal', component: Personal ,title: '提交个人回访申请'},
    { path: '/news', component: News,title: '新闻详情' },
    { path: '/Application', component: Application ,title: '查看申请进度'},
    { path: '/rural', component: rural ,title: '提交乡村回访申请'},
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
